﻿using BaseDll;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UserData
{
    public class TestInfo
    {
        public string Name { get; set; }
        public dynamic Value { get; set; }
        public int PointCount { get; set; } = 0;
        public string Max { get; set; } = "/";
        public string Min { get; set; } = "/";
        public override string ToString()
        {
            object obj = Value;
            if (obj != null)
                return obj.ToString();
            else
                return "";
        }
    }

    public class SaveAdditionalInfo
    {
        public TestInfo time_当前时间 { get; set; } = new TestInfo { Name = "当前时间", Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Max = " ", Min = " " };
        public TestInfo str_Name { get; set; } = new TestInfo { Name = "名称", Value = "", Max = " ", Min = " " };


    }


    public class TestResultbase
    {


    }
    public class TestResult: TestResultbase
    {
        public TestInfo time_当前时间 { get; set; } = new TestInfo { Name = "当前时间", Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Max = " ", Min = " " };
        public TestInfo time_结束时间 { get; set; } = new TestInfo { Name = "结束时间", Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Max = " ", Min = " " };
        public TestInfo str_机型 { get; set; } = new TestInfo { Name = "机型", Value = "", Max = " ", Min = " " };
        public TestInfo str_批次 { get; set; } = new TestInfo { Name = "批次", Value = "", Max = " ", Min = " " };
        public TestInfo str_操作者 { get; set; } = new TestInfo { Name = "设备操作者", Value = "", Max = " ", Min = " " };
        public TestInfo str_设备编号 { get; set; } = new TestInfo { Name = "设备编号", Value = "", Max = " ", Min = " " };
        public TestInfo str_工站编号 { get; set; } = new TestInfo { Name = "工站编号", Value = "", Max = " ", Min = " " };
        public TestInfo str_外壳SN { get; set; } = new TestInfo { Name = "外壳SN", Value = "", Max = " ", Min = " " };
        public TestInfo 最终结果 { get; set; } = new TestInfo() { Name = "最终结果", Value = "OK", Max = " ", Min = " ", };
        public TestInfo 测试结果 { get; set; } = new TestInfo() { Name = "测试结果", Value = true, Max = " ", Min = " ", };
        public TestInfo FailStep { get; set; } = new TestInfo { Name = "NG原因", Value = "", Max = " ", Min = " " };


        public TestInfo ErrValue1 { get; set; } = new TestInfo { Name ="测试值1", Value = double.NaN, Max = " ", Min = " ",PointCount = 6};
        public TestInfo ErrValue2 { get; set; } = new TestInfo { Name = "测试值2", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue3 { get; set; } = new TestInfo { Name = "测试值3", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue4 { get; set; } = new TestInfo { Name = "测试值4", Value = double.NaN, Max = " ", Min = " ",PointCount = 6};
        public TestInfo ErrValue5 { get; set; } = new TestInfo { Name = "测试值5", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue6 { get; set; } = new TestInfo { Name = "测试值6", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue7 { get; set; } = new TestInfo { Name = "测试值7", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue8 { get; set; } = new TestInfo { Name = "测试值8", Value = double.NaN, Max = " ", Min = " ",PointCount = 6};
        public TestInfo ErrValue9 { get; set; } = new TestInfo { Name = "测试值9", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue10 { get; set; } = new TestInfo { Name = "测试值10", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue11 { get; set; } = new TestInfo { Name = "测试值11", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue12 { get; set; } = new TestInfo { Name = "测试值12", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue13 { get; set; } = new TestInfo { Name = "测试值13", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue14 { get; set; } = new TestInfo { Name = "测试值14", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue15 { get; set; } = new TestInfo { Name = "测试值15", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };
        public TestInfo ErrValue16 { get; set; } = new TestInfo { Name = "测试值16", Value = double.NaN, Max = " ", Min = " ", PointCount = 6 };


    }
}
